<!-- 生产效能报表 -->
<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="项目档案编号">
              <j-input placeholder="请输入项目档案编号" v-model="queryParam.projectFinalNo"></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="任务档案编号">
              <j-input placeholder="请输入任务档案编号" v-model="queryParam.taskFinalNo"></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="项目名称">
              <j-input placeholder="请输入项目名称" v-model="queryParam.projectName"></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="经营团队" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <select-team-input placeholder="请选择经营团队" v-model="queryParam.projectTeamName" :tdlx="1" :teamType="0"/>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="生产团队">
              <select-team-input v-model="queryParam.taskProductTeam" :tdlx="1" :teamType="0"/>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="业主单位" prop="projectOwnerUnit" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <select-customer-input
                commercialType="1"
                v-model="queryParam.projectOwnerUnit"/>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="签订单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <select-Company-input placeholder="请选择签订单位" v-model="queryParam.projectSignUnit"/>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="任务年度">
              <a-date-picker
                mode="year"
                placeholder="请选择任务年度"
                format="YYYY"
                v-model="queryParam.queryYear"
                style="width:100%"
                :allowClear="false"
                :open="yearShowOne"
                @openChange="openChangeOne"
                @panelChange="panelChangeOne"
              />
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="任务状态">
              <j-dict-select-tag placeholder="请选择任务状态" v-model="queryParam.taskDistributionType" dictCode="distribution_type_efficiency"/>
            </a-form-item>
          </a-col>
          <!-- <template v-if="toggleSearchStatus"></template> -->
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
              <!-- <a @click="handleToggleSearch" style="margin-left: 8px">
                {{ toggleSearchStatus ? '收起' : '展开' }}
                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
              </a> -->
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->
    <!-- 操作按钮区域 -->
    <div class="table-operator">
      <a-button :loading="exportLoading" type="primary" icon="download" @click="handleExportXls(exportName)">导出
      </a-button>
      <a-popover title="自定义列" trigger="click" placement="leftBottom">
        <template slot="content">
          <a-checkbox-group @change="onColSettingsChange" v-model="settingColumns" :defaultValue="settingColumns">
            <a-row>
              <template v-for="(item, index) in defColumns">
                <template v-if="item.key!='rowIndex'&& item.dataIndex!='action'">
                  <a-col :span="12" :key="index">
                    <a-checkbox :value="item.dataIndex">{{ item.title }}</a-checkbox>
                  </a-col>
                </template>
              </template>
            </a-row>
          </a-checkbox-group>
        </template>
        <a style="float: right; margin-top: -20px;">
          <a-icon type="setting" :style="iconStyle"/>
        </a>
      </a-popover>
    </div>
    <!-- table区域-begin -->
    <div>
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
          style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
      </div>
      <a-table
        ref="table"
        size="middle"
        :scroll="{x:scrollX}"
        bordered
        :components="draggableComponent"
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        class="j-table-force-nowrap"
        @change="handleTableChange">
        <a slot="projectName" slot-scope="text, record" @click="onDetail(record.projectId)">{{ record.projectName }}</a>
        <p slot="contractFwqx" slot-scope="text, record">{{ record.contractFwqx?((record.contractFwqx.length > 10 ? record.contractFwqx.substr(0, 10) : record.contractFwqx)+ '~' + (record.contractFwqxEnd.length > 10 ? record.contractFwqxEnd.substr(0, 10) : record.contractFwqxEnd)):'' }}</p>
        <template slot="status" slot-scope="status">
          <a-badge :status="status | statusTypeFilter" :text="status | statusFilter"/>
        </template>
        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </template>
        <template slot="imgSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
          <img
            v-else
            :src="getImgView(text)"
            height="25px"
            alt=""
            style="max-width:80px;font-size: 12px;font-style: italic;"/>
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
          <a-button
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="downloadFile(text)">
            下载
          </a-button>
        </template>
      </a-table>
    </div>
    <!-- 项目详情开始 -->
    <erp-project-report-modal ref="projectModalForm"></erp-project-report-modal>
    <!-- 项目详情结束 -->
  </a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ErpProjectReportModal from '@/views/erp/report/project/modules/ErpProjectReportModal'
import { DisabledAuthFilterMixin } from '@/mixins/DisabledAuthFilterMixin'
import SelectTeamInput from '@views/scy/components/SelectTeamInput'
import SelectUserByDep from '@/views/scy/components/SelectUserByDep'
import SelectCustomerInput from '@views/scy/components/SelectCustomerInput'
import BusinessCategoryNameSelect from '@views/erp/components/BusinessCategoryNameSelect'
import SelectCompanyInput from '@/views/scy/components/SelectCompanyInput'
import { getAction, downFile } from '@/api/manage'
import moment from 'moment'
var queryYear = moment().format('YYYY')
export default {
  name: 'ErpOmcProductionEfficiencyReportFileList',
  mixins: [JeecgListMixin, mixinDevice, DisabledAuthFilterMixin],
  components: {
    ErpProjectReportModal,
    SelectTeamInput,
    SelectUserByDep,
    SelectCustomerInput,
    BusinessCategoryNameSelect,
    SelectCompanyInput
  },
  data() {
    return {
      /* 排序参数 */
      isorter: {
        column: '',
        order: ''
      },
      yearShowOne: false,
      exportName: '生产效能报表' + moment().format('YYYYMMDDHHmm'),
      queryParam: {
        // 年份是当前年份
        queryYear: moment().format('YYYY'),
        taskDistributionType: 'producting'
      },
      description: '生产效能报表',
      // 表头
      columns: [],
      // 列设置
      settingColumns: [],
      // 列定义
      defColumns: [
        {
          title: '序号',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: 'center',
          ellipsis: true,
          customRender: function (t, r, index) {
            return parseInt(index) + 1;
          }
        },
        {
          title: '项目档案编号',
          align: 'center',
          dataIndex: 'projectFinalNo',
          ellipsis: true,
          width: 180
        },
        {
          title: '项目名称',
          align: 'center',
          dataIndex: 'projectName',
          scopedSlots: { customRender: 'projectName' },
          ellipsis: true,
          width: 200
        },
        {
          title: '经营团队',
          align: 'center',
          dataIndex: 'projectTeamName_dictText',
          ellipsis: true,
          width: 200
        },
        {
          title: '业绩归属年度',
          align: 'center',
          dataIndex: 'projectYear_dictText',
          ellipsis: true,
          width: 110
        },
        {
          title: '业主单位',
          align: 'center',
          dataIndex: 'projectOwnerUnit_dictText',
          ellipsis: true,
          width: 200
        },
        {
          title: '签订单位',
          align: 'center',
          dataIndex: 'projectSignUnit_dictText',
          ellipsis: true,
          width: 200
        },
        {
          title: '合同总额(元)',
          align: 'center',
          dataIndex: 'projectEstimatedContractAmount',
          ellipsis: true,
          width: 100
        },
        {
          title: '任务档案编号',
          align: 'center',
          dataIndex: 'taskFinalNo',
          ellipsis: true,
          width: 180
        },
        {
          title: '业务分类',
          align: 'center',
          dataIndex: 'taskCategoryName',
          ellipsis: true,
          width: 200
        },
        {
          title: '生产团队',
          align: 'center',
          dataIndex: 'taskProductTeam_dictText',
          ellipsis: true,
          width: 200
        },
        {
          title: '实施部门',
          align: 'center',
          dataIndex: 'taskExecuteDepart_dictText',
          ellipsis: true,
          width: 150
        },
        {
          title: '项目负责人',
          align: 'center',
          dataIndex: 'taskProjectLeading_dictText',
          ellipsis: true,
          width: 150
        },
        {
          title: '分配合同额(元)',
          align: 'center',
          dataIndex: 'taskContractAmount',
          ellipsis: true,
          width: 120
        },
        {
          title: '任务状态',
          align: 'center',
          dataIndex: 'taskDistributionType_dictText',
          ellipsis: true,
          width: 100
        },
        {
          title: '是否流程作废',
          align: 'center',
          dataIndex: 'taskIsFlowCancel_dictText',
          ellipsis: true,
          width: 130
        },
        {
          title: '年初所处阶段',
          align: 'center',
          dataIndex: 'beginYearNodeName',
          ellipsis: true,
          width: 130
        },
        {
          title: '年初完成进度(%)',
          align: 'center',
          dataIndex: 'beginYearNodeProgress',
          ellipsis: true,
          width: 150
        },
        {
          title: '本年度累计效能(元)',
          align: 'center',
          dataIndex: 'totalEfficiency',
          ellipsis: true,
          width: 150
        },
        {
          title: queryYear + '年1月',
          dataIndex: 'yearMonth1',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'janNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'janNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'janProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年2月',
          dataIndex: 'yearMonth2',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'febNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'febNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'febProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年3月',
          dataIndex: 'yearMonth3',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'marNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'marNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'marProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年4月',
          dataIndex: 'yearMonth4',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'aprNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'aprNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'aprProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年5月',
          dataIndex: 'yearMonth5',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'mayNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'mayNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'mayProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年6月',
          dataIndex: 'yearMonth6',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'junNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'junNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'junProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年7月',
          dataIndex: 'yearMonth7',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'julNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'julNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'julProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年8月',
          dataIndex: 'yearMonth8',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'augNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'augNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'augProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年9月',
          dataIndex: 'yearMonth9',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'septNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'septNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'septProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年10月',
          dataIndex: 'yearMonth10',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'octNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'octNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'octProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年11月',
          dataIndex: 'yearMonth11',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'novNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'novNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'novProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年12月',
          dataIndex: 'yearMonth12',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'decNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'decNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'decProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        }
      ],
      url: {
        list: '/api/erp/omc/productionEfficiency/erpOmcProductionEfficiency/queryPageReportList',
        exportXlsUrl: '/api/erp/omc/productionEfficiency/erpOmcProductionEfficiency/reportExportXls',
        queryProjectById: '/api/erp/project/report/erpProjectReport/queryById'
      },
      dictOptions: {},
      superFieldList: []
    }
  },
  created() {
    this.getSuperFieldList();
  },
  computed: {
    importExcelUrl: function () {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
    }
  },
  methods: {
    onDetail(id) {
      const that = this
      this.$nextTick(() => {
        getAction(this.url.queryProjectById, { id }).then((res) => {
          if (res.success) {
            const model = res.result
            that.$refs.projectModalForm.getDetail(model);
            that.$refs.projectModalForm.title = '项目一览表';
          }
        })
      })
    },
    initDictConfig() {
    },
    loadData(arg) {
      if (!this.url.list) {
        this.$message.error('请设置url.list属性!')
        return
      }
      // 加载数据 若传入参数1则加载第一页的内容
      if (arg === 1) {
        this.ipagination.current = 1
      }
      var params = this.getQueryParams() // 查询条件
      // params.pageUrl = this.$route.path
      // 产品这里非要加一个全部的选择，如果去掉全部的选择，请大骂产品
      if (params && params.taskDistributionType && params.taskDistributionType == '666') {
        params.taskDistributionType = ''
      }
      this.loading = true
      getAction(this.url.list, params).then(res => {
        if (res.success) {
          // update-begin---author:zhangyafei    Date:20201118  for：适配不分页的数据列表------------
          this.dataSource = res.result.records || res.result
          if (res.result.total) {
            this.ipagination.total = res.result.total
          } else {
            this.ipagination.total = 0
          }
          // 判断是否当前页没有数据且不为第一页
          if (this.dataSource.length == 0 && this.ipagination.current != 1) {
            this.ipagination.current = this.ipagination.current - 1
            this.loadData(this.ipagination.current - 1);
          }
          // update-end---author:zhangyafei    Date:20201118  for：适配不分页的数据列表------------
        } else {
          this.dataSource = [];
          this.ipagination.total = 0
          this.$message.warning(res.message)
        }
        if (res.code === 510) {
          this.$message.warning(res.message)
        }
        this.loading = false
      }).catch(err => {
        this.$message.warning(err.message)
      })
    },
    handleExportXls(fileName) {
      this.exportLoading = true
      if (!fileName || typeof fileName !== 'string') {
        fileName = '导出文件'
      }
      let param = this.getQueryParams()
      if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
        param['selections'] = this.selectedRowKeys.join(',')
      }
      // 产品这里非要加一个全部的选择，如果去掉全部的选择，请大骂产品
      if (param && param.taskDistributionType && param.taskDistributionType == '666') {
        param.taskDistributionType = ''
      }
      downFile(this.url.exportXlsUrl, param).then(data => {
        if (!data) {
          this.$message.warning('文件下载失败')
          return
        }
        if (typeof window.navigator.msSaveBlob !== 'undefined') {
          window.navigator.msSaveBlob(
            new Blob([data], {
              type: 'application/vnd.ms-excel'
            }),
            fileName + '.xls'
          )
        } else {
          let url = window.URL.createObjectURL(
            new Blob([data], {
              type: 'application/vnd.ms-excel'
            })
          )
          let link = document.createElement('a')
          link.style.display = 'none'
          link.href = url
          link.setAttribute('download', fileName + '.xls')
          document.body.appendChild(link)
          link.click()
          document.body.removeChild(link) // 下载完成移除元素
          window.URL.revokeObjectURL(url) // 释放掉blob对象
        }
      }).finally(() => {
        this.exportLoading = false
      })
    },
    // 弹出日历和关闭日历的回调
    openChangeOne(status) {
      // status是打开或关闭的状态
      this.yearShowOne = !this.yearShowOne
    },
    // 得到年份选择器的值
    panelChangeOne(value) {
      this.queryParam.queryYear = moment(value).format('YYYY')
      this.yearShowOne = !this.yearShowOne
    },
    searchReset() {
      this.queryParam = {}
      this.$set(this.queryParam, 'queryYear', moment().format('YYYY'));
      this.$set(this.queryParam, 'taskDistributionType', 'producting');
      queryYear = moment().format('YYYY')
      this.columnsChange()
    },
    searchQuery() {
      this.onClearSelected();
      queryYear = this.queryParam.queryYear
      this.columnsChange()
    },
    columnsChange () {
      this.defColumns = [
        {
          title: '序号',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: 'center',
          ellipsis: true,
          customRender: function (t, r, index) {
            return parseInt(index) + 1;
          }
        },
        {
          title: '项目档案编号',
          align: 'center',
          dataIndex: 'projectFinalNo',
          ellipsis: true,
          width: 180
        },
        {
          title: '项目名称',
          align: 'center',
          dataIndex: 'projectName',
          scopedSlots: { customRender: 'projectName' },
          ellipsis: true,
          width: 200
        },
        {
          title: '经营团队',
          align: 'center',
          dataIndex: 'projectTeamName_dictText',
          ellipsis: true,
          width: 200
        },
        {
          title: '业绩归属年度',
          align: 'center',
          dataIndex: 'projectYear_dictText',
          ellipsis: true,
          width: 110
        },
        {
          title: '业主单位',
          align: 'center',
          dataIndex: 'projectOwnerUnit_dictText',
          ellipsis: true,
          width: 200
        },
        {
          title: '签订单位',
          align: 'center',
          dataIndex: 'projectSignUnit_dictText',
          ellipsis: true,
          width: 200
        },
        {
          title: '合同总额(元)',
          align: 'center',
          dataIndex: 'projectEstimatedContractAmount',
          ellipsis: true,
          width: 100
        },
        {
          title: '任务档案编号',
          align: 'center',
          dataIndex: 'taskFinalNo',
          ellipsis: true,
          width: 180
        },
        {
          title: '业务分类',
          align: 'center',
          dataIndex: 'taskCategoryName',
          ellipsis: true,
          width: 200
        },
        {
          title: '生产团队',
          align: 'center',
          dataIndex: 'taskProductTeam_dictText',
          ellipsis: true,
          width: 200
        },
        {
          title: '实施部门',
          align: 'center',
          dataIndex: 'taskExecuteDepart_dictText',
          ellipsis: true,
          width: 150
        },
        {
          title: '项目负责人',
          align: 'center',
          dataIndex: 'taskProjectLeading_dictText',
          ellipsis: true,
          width: 150
        },
        {
          title: '分配合同额(元)',
          align: 'center',
          dataIndex: 'taskContractAmount',
          ellipsis: true,
          width: 120
        },
        {
          title: '任务状态',
          align: 'center',
          dataIndex: 'taskDistributionType_dictText',
          ellipsis: true,
          width: 100
        },
        {
          title: '是否流程作废',
          align: 'center',
          dataIndex: 'taskIsFlowCancel_dictText',
          ellipsis: true,
          width: 130
        },
        {
          title: '年初所处阶段',
          align: 'center',
          dataIndex: 'beginYearNodeName',
          ellipsis: true,
          width: 130
        },
        {
          title: '年初完成进度(%)',
          align: 'center',
          dataIndex: 'beginYearNodeProgress',
          ellipsis: true,
          width: 150
        },
        {
          title: '本年度累计效能(元)',
          align: 'center',
          dataIndex: 'totalEfficiency',
          ellipsis: true,
          width: 150
        },
        {
          title: queryYear + '年1月',
          dataIndex: 'yearMonth1',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'janNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'janNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'janProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年2月',
          dataIndex: 'yearMonth2',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'febNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'febNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'febProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年3月',
          dataIndex: 'yearMonth3',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'marNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'marNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'marProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年4月',
          dataIndex: 'yearMonth4',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'aprNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'aprNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'aprProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年5月',
          dataIndex: 'yearMonth5',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'mayNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'mayNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'mayProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年6月',
          dataIndex: 'yearMonth6',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'junNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'junNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'junProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年7月',
          dataIndex: 'yearMonth7',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'julNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'julNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'julProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年8月',
          dataIndex: 'yearMonth8',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'augNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'augNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'augProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年9月',
          dataIndex: 'yearMonth9',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'septNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'septNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'septProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年10月',
          dataIndex: 'yearMonth10',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'octNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'octNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'octProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年11月',
          dataIndex: 'yearMonth11',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'novNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'novNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'novProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        },
        {
          title: queryYear + '年12月',
          dataIndex: 'yearMonth12',
          children: [
            {
              title: '本月所处阶段',
              align: 'center',
              dataIndex: 'decNodeName',
              ellipsis: true,
              width: 120
            },
            {
              title: '本月所处进度',
              align: 'center',
              dataIndex: 'decNodeProgress',
              ellipsis: true,
              width: 180
            },
            {
              title: '本月完成效能',
              align: 'center',
              dataIndex: 'decProductionEfficiency',
              ellipsis: true,
              width: 120
            }
          ]
        }
      ]
      this.initColumns()
      this.loadData(1)
    },
    handleReset() {
      this.allSearchReset();
    },
    getSuperFieldList() {
      let fieldList = [];
      fieldList.push({ type: 'string', value: 'year', text: '归属年度', dictCode: 'yjgsnd' })
      fieldList.push({ type: 'string', value: 'accountAdmin', text: '台账管理员', dictCode: '' })
      fieldList.push({ type: 'string', value: 'projectAddress', text: '项目地址', dictCode: '' })
      fieldList.push({ type: 'Text', value: 'outline', text: '项目内容概要', dictCode: '' })
      fieldList.push({
        type: 'string',
        value: 'prepareProjectId',
        text: '预立项',
        dictCode: 'erp_omc_prepare_project,mc,id'
      })
      fieldList.push({ type: 'string', value: 'projectName', text: '项目名称', dictCode: '' })
      fieldList.push({ type: 'string', value: 'projectNo', text: '项目编号', dictCode: '' })
      fieldList.push({ type: 'string', value: 'projectType', text: '项目类型', dictCode: 'xmlx_type' })
      fieldList.push({ type: 'string', value: 'ownerUnit', text: '业主单位', dictCode: '' })
      fieldList.push({ type: 'string', value: 'handler', text: '经办人', dictCode: '' })
      fieldList.push({ type: 'string', value: 'handingDepartmernt', text: '经办部门', dictCode: 'departments' })
      fieldList.push({ type: 'string', value: 'teamName', text: '经营团队', dictCode: 'teams' })
      fieldList.push({ type: 'string', value: 'undertaker', text: '承接人', dictCode: '' })
      fieldList.push({ type: 'date', value: 'projectEstablishDate', text: '立项日期' })
      fieldList.push({ type: 'string', value: 'signUnit', text: '签订单位', dictCode: '' })
      fieldList.push({ type: 'BigDecimal', value: 'estimatedContractAmount', text: '预计合同额(元)', dictCode: '' })
      fieldList.push({ type: 'string', value: 'estimatedContractcapitalChineseAmount', text: '预计合同额(元)大写', dictCode: '' })
      fieldList.push({
        type: 'string',
        value: 'isEnvironmentalAssessmentProject',
        text: '是否环评项目',
        dictCode: 'YES_OR_NO'
      })
      fieldList.push({ type: 'string', value: 'contacts', text: '联系人', dictCode: '' })
      fieldList.push({ type: 'string', value: 'contactTel', text: '联系方式', dictCode: '' })
      fieldList.push({ type: 'string', value: 'projectSource', text: '项目来源', dictCode: 'xmly_type' })
      fieldList.push({ type: 'string', value: 'isPrepareEstablish', text: '数据来源', dictCode: 'omc_project_type' })
      fieldList.push({ type: 'string', value: 'status', text: '流程状态', dictCode: 'project_status' })
      fieldList.push({ type: 'string', value: 'attachment', text: '相关附件', dictCode: '' })
      fieldList.push({ type: 'string', value: 'isPrepareEstablish', text: '是否预立项', dictCode: 'YES_OR_NO' })
      fieldList.push({ type: 'string', value: 'isBidding', text: '是否招投标', dictCode: 'YES_OR_NO' })
      fieldList.push({ type: 'Text', value: 'establishReason', text: '立项事由及说明', dictCode: '' })
      fieldList.push({ type: 'pca', value: 'areaCode', text: '县区编码' })
      this.superFieldList = fieldList
    },
    businessCategoryHandle(obj) {
      if (obj) {
        this.queryParam.taskCategoryName = obj.categoryName;
      }
    }
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
